import service from "@/utils/request"

// 级联菜单
export const categoryMenuApi = () => {
    return service({
        url: "/admin/category/menu",
        method: "get"
    })
}

// 添加分类
export const categoryAddApi = (data) => {
    return service({
        url: "/admin/category/add",
        method: "post",
        data
    })
}

// 修改分类
export const categoryEditApi = (data) => {
    return service({
        url: "/admin/category/edit",
        method: "put",
        data
    })
}

// 删除分类
export const categoryDeleApi = (data) => {
    return service({
        url: "/admin/category/dele",
        method: "delete",
        data
    })
}

// 分类列表
export const categoryListApi = (params) => {
    return service({
        url: "/admin/category/list",
        method: "get",
        params
    })
}